package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户发帖信息对象 posts
 * 
 * @author ruoyi
 * @date 2025-03-08
 */
public class Posts extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private String userName;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    /** 帖子唯一ID（主键） */
    private Long postId;

    /** 发帖用户ID（外键关联User表） */
    @Excel(name = "发帖用户ID", readConverterExp = "外=键关联User表")
    private Long userId;

    /** 帖子标题 */
    @Excel(name = "帖子标题")
    private String title;

    /** 帖子正文内容 */
    @Excel(name = "帖子正文内容")
    private String content;

    /** 帖子发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "帖子发布时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date postTime;

    /** 帖子最后修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "帖子最后修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastUpdate;

    /** 帖子浏览数 */
    @Excel(name = "帖子浏览数")
    private Long viewCount;

    /** 帖子评论数 */
    @Excel(name = "帖子评论数")
    private Long commentCount;

    /** 帖子情感分析得分（如正面/负面评分） */
    @Excel(name = "帖子情感分析得分", readConverterExp = "如=正面/负面评分")
    private Long score;

    public void setPostId(Long postId) 
    {
        this.postId = postId;
    }

    public Long getPostId() 
    {
        return postId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setPostTime(Date postTime) 
    {
        this.postTime = postTime;
    }

    public Date getPostTime() 
    {
        return postTime;
    }

    public void setLastUpdate(Date lastUpdate) 
    {
        this.lastUpdate = lastUpdate;
    }

    public Date getLastUpdate() 
    {
        return lastUpdate;
    }

    public void setViewCount(Long viewCount) 
    {
        this.viewCount = viewCount;
    }

    public Long getViewCount() 
    {
        return viewCount;
    }

    public void setCommentCount(Long commentCount) 
    {
        this.commentCount = commentCount;
    }

    public Long getCommentCount() 
    {
        return commentCount;
    }

    public void setScore(Long score) 
    {
        this.score = score;
    }

    public Long getScore() 
    {
        return score;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("postId", getPostId())
            .append("userId", getUserId())
            .append("title", getTitle())
            .append("content", getContent())
            .append("postTime", getPostTime())
            .append("lastUpdate", getLastUpdate())
            .append("viewCount", getViewCount())
            .append("commentCount", getCommentCount())
            .append("score", getScore())
            .toString();
    }
}
